﻿using Sustainalytics.Entities.ESGRatings;
using Sustainalytics.ESG.Entities;
using System;
using System.Collections.Generic;

namespace Sustainalytics.ClientDW.DataAccessLayer.ESGRatings
{
    public interface IWeightMatricesRepository
    {
        void Cleanup();

        WeightMatrix GetWeightMatrix(Guid weightMatrixId);

        WeightMatrix GetWeightMatrixByNameAndAccountId(string weightMatrixName, Guid? accountId = null);

        void SaveWeightMatrix(WeightMatrix weightMatrix);

        void DeleteWeightMatrix(Guid weightMatrixId);

        void DeletePeerGroupsWeights(Guid weightMatrixId);

        void DeletePeerGroupsWeights(IEnumerable<PeerGroupWeights> weights);

        void DeleteCompaniesWeights(Guid weightMatrixId);

        void SavePeerGroupWeights(IEnumerable<PeerGroupWeights> peerGroupWeights);

        void SaveCompanyWeights(IEnumerable<CompanyWeights> companyWeights);

        List<WeightMatrix> ListWeightMatrices();

        List<WeightMatrix> ListWeightMatricesByAccountId( Guid? accountId, bool includeDetails = true);

        int CountWeightMatricesByAccountId(Guid? accountId);

        Dictionary<Guid, List<PeerGroupWeights>> ListPeerGroupWeights(IEnumerable<Guid> weightMatricesIds);

        Dictionary<Guid, List<CompanyWeights>> ListCompanyWeights(IEnumerable<Guid> weightMatricesIds);

        List<CompanyWeights> ListCompanyWeightsByCompanyIds(IEnumerable<Guid> companyIds);

        void RemoveCompanyWeightsByCompanyIds(IEnumerable<Guid> companyIds);

        void DeleteCompaniesWeights(IEnumerable<CompanyWeights> weights);

    }
}
